<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');


// route of admin - begin
Route::get('/api/admin/test', 'admin.Test/index')->allowCrossDomain();
Route::post('/api/admin/uploader', 'admin.Uploader/upload')->allowCrossDomain();
Route::post('/api/admin/login', 'admin.Login/login')->allowCrossDomain();
Route::post('/api/admin/regist', 'admin.Login/regist')->allowCrossDomain();
Route::any('/api/admin/profile/<id>', 'admin.Login/profile')->allowCrossDomain();
Route::post('/api/admin/get-password/<id>', 'admin.Login/getPassword')->allowCrossDomain();
Route::post('/api/admin/reset-password/<id>', 'admin.Login/resetPassword')->allowCrossDomain();
Route::any('/api/admin/menu', 'admin.Login/menu')->allowCrossDomain();
Route::post('/api/admin/main', 'admin.Index/main')->allowCrossDomain();
Route::get('/api/admin/esxdm-auth-admin/copy/<id>', 'admin.EsxdmAuthAdmin/copy')->allowCrossDomain();
Route::resource('/api/admin/esxdm-auth-admin', 'admin.EsxdmAuthAdmin');
Route::resource('/api/admin/esxdm-auth-group', 'admin.EsxdmAuthGroup');
Route::resource('/api/admin/esxdm-auth-rule', 'admin.EsxdmAuthRule');
Route::post('/api/admin/ec-goods/update-sku/<id>', 'admin.EcGoods/updateSku');
Route::resource('/api/admin/ec-goods', 'admin.EcGoods');
Route::get('/api/admin/ec-category/copy/<id>', 'admin.EcCategory/copy');
Route::resource('/api/admin/ec-category', 'admin.EcCategory');
Route::resource('/api/admin/ec-specification', 'admin.EcSpecification');
Route::resource('/api/admin/ec-attribute', 'admin.EcAttribute');
Route::resource('/api/admin/ec-brand', 'admin.EcBrand');
Route::resource('/api/admin/ec-tags', 'admin.EcTags');
// route of admin - end